<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>海骊项目评估</title>
    <!--引入当前应用的static/css目录下的style.css文件-->
    {js href='__ADDONSTATIC__js/jquery-3.2.1.min.js' /}
    {CSS href="__ADDONSTATIC__/css/css.css" /}

    {js href='__ADDONSTATIC__js/xadmin.js' /}
    {js href='__ADDONSTATIC__js/util.js' /}
    {js href='__ADDONSTATIC__lib/layui/layui.js' /}
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="center">
    <div class="reg_tit">欢迎关注海骊，请填写负责人电话</div>
    <!--    <div class="reg_article">
            <label>姓名：</label>
            <input type="text" name="" id="username" placeholder="请输入你的真实姓名" />
        </div>-->
    <div class="reg_article">
        <label>电话：</label>
        <input type="tell" name="telphone" value="" id="telphone" placeholder="请输入你正确的手机号"/>
    </div>
    <div class="reg_btn">
        <button id="button">提交</button>
    </div>
</div>
</body>
{:hook('Jssdk')}
<script>
    /**
     * 提交
     */
    $("#button").click(function () {
//        var username = $("#username").val();
        var telphone = $("#telphone").val();
        var dd=telphone.replace(/<\/?.+?>/g,"");
        var telphone=dd.replace(/ /g,"");
        ajaxUrl("{:addonUrl('Wap/registPhone')}",{telphone: telphone},function (data) {
            console.log(data);
            layer.alert(data.message, {},function(index){
                layer.close(index);
                if(data.code==1){
                    // 微信页面关闭
                    WeixinJSBridge.invoke('closeWindow', {}, function (res) {
                    });
                }
            });
        });

    })
</script>
</html>